package com.wfuhui.modules.order.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;

import java.util.Date;

@ExcelTarget("financeDetail")
public class FinanceDetail {
    @Excel(name = "订单编号", width = 30, isImportField = "order_number")
    private String orderNumber;
    @Excel(name = "支付时间", width = 30, isImportField = "pay_time", exportFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    @Excel(name = "收支类型", width = 30, isImportField = "order_status", replace = { "收入_2", "收入_3", "收入_4", "支出_5"})
    private int orderStatus;
    @Excel(name = "资金形式", width = 30, isImportField = "pay_type")
    private String payType = "微信支付";
    @Excel(name = "账号", width = 30, isImportField = "account_no")
    private String accountNo = "优机食汇";
    @Excel(name = "交易人", width = 30, isImportField = "real_name")
    private String realName;
    @Excel(name = "金额", width = 30, isImportField = "total_amount")
    private String totalAmount;

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getTotalAmount() {
    	if(getOrderStatus() == 5) {
    		return "-" + totalAmount + "元";
    	}
        return totalAmount + "元";
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

	public String getAccountNo() {
		return accountNo;
	}

	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}
    
    
}
